<?php 
    $url = new Url();
    $link_url = Yii::app()->params['urlRs']."/upload/upload_library.php?forder_up=exercise";  
?>
<link href="<?php echo Yii::app()->params['urlRs']; ?>/js/swfupload/css/default.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="<?php echo Yii::app()->params['urlRs']; ?>/js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->params['urlRs']; ?>/js/swfupload/js/handlers.js"></script>

<div id="main" class="nosidebar">                
    <div id="content">

        <h2>Thiết lập</h2>

        <div class="flash notice" id="flash_notice" style="display: none;">Sửa dự án thành công!</div>

        <div id="errorExplanation" style="display: none;">
            <ul id="err_msg">
                <!--<li>Tên không thể để trắng</li>
                <li>Mã nhận dạng không thể để trắng</li>
                <li>Mã nhận dạng quá ngắn (tối thiểu 1 ký tự)</li>-->
            </ul>
        </div>

        <?php $this->widget("TabSetting");?>

        <div style="display: block;" class="tab-content" id="tab-content-info">                            
            <div class="box tabular">                
                <div style="float: left;width: 60%;">
                    <p><label for="project_name">Tên<span class="required"> *</span></label><input id="project_name" name="project[name]" size="60" value="<?php echo $_SESSION['project_pm']['project_name']; ?>" type="text"></p>
                    <p><label for="project_description">Mô tả</label><textarea class="wiki-edit" cols="40" id="project_description" name="project[description]" rows="5"><?php echo $_SESSION['project_pm']['project_description']; ?></textarea></p>
                    <p><label for="project_identifier">Mã nhận dạng<span class="required"> *</span></label><input disabled="disabled" id="project_identifier" name="project[identifier]" size="60" value="<?php echo $_SESSION['project_pm']['project_alias']; ?>" type="text"></p>
                    <p><label for="project_homepage">Trang chủ</label><input id="project_homepage" name="project[homepage]" size="60" value="<?php echo $_SESSION['project_pm']['project_homepage']; ?>" type="text"></p>
                    <p><label for="project_homepage">Ngân sách dự án</label><input id="project_budget" name="project[homepage]" size="20" value="<?php echo number_format($_SESSION['project_pm']['project_budget'],0); ?>" type="text"></p>
                    <p><label for="project_homepage">Công ty</label><input id="project_company" name="project[homepage]" size="20" value="<?php echo $_SESSION['project_pm']['project_company']; ?>" type="text"></p>
                    <p><label for="project_homepage">Khách hàng</label><input id="project_customer" name="project[homepage]" size="20" value="<?php echo $_SESSION['project_pm']['project_customer']; ?>" type="text"></p>                    
                    <p><label for="project_homepage">Thời gian bắt đầu dự án</label><input id="project_start_date" name="project[homepage]" size="20" value="<?php echo date('d/m/Y',$_SESSION['project_pm']['project_start_date']); ?>" type="text"></p>
                    <p><label for="project_homepage">Thời gian dự kiến kết thúc dự án</label><input id="project_end_date" name="project[homepage]" size="20" value="<?php echo date('d/m/Y',$_SESSION['project_pm']['project_end_date']); ?>" type="text"></p>
                    <p><label for="project_is_public">Công cộng</label><input <?php if($_SESSION['project_pm']['project_status'] == 1){echo "checked";} ?> id="project_is_public" name="project[is_public]" value="1" type="checkbox"></p>                                
                    <p><label for="user_mail">Ảnh đại diện</label>                
                        <input type="text" id="txtFileName" disabled="disabled" style="background-color: #FFFFFF;" size="30" value="<?php echo $_SESSION['project_pm']['project_image']; ?>" />                            
                        <span id="spanButtonPlaceholder"></span>                    
                        <!--<div class="flash" id="divFileProgressContainer" style="display: none;"></div>                -->
                    </p>
                    <div id="divFileProgressContainer" style="margin-left:175px;"></div>
                </div>          
                <div id="thumbnails" style="float: left ;">
                    <!--<img style="width: 300px;" src="<?=Yii::app()->params["urlRs"] ?>/images/abc.jpg" />      -->
                    <img style="max-width: 300px;max-height: 300px;" src="<?=Yii::app()->params["urlImage"].$_SESSION['project_pm']['project_image']; ?>" />
                </div>
                <div class="cb"></div>
            </div>
            <input id="submit_button" name="commit" value="Lưu" type="button" onclick="edit_project(<?php echo $_SESSION['project_pm']['project_id']; ?>)">
        </div>
        <div style="clear:both;"></div>
    </div>
</div>

<?php include "detail.js.php"; ?>